
public class MauMau {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		if(args.length != 4) {
			System.out.println("parameters: Player1 Player2 Player3 Player4");
			return;
		}
		
        System.out.println("Schnauz Framework");
        System.out.print("Player 1: "); System.out.println(args[0]);
        System.out.print("Player 2: "); System.out.println(args[1]);
        System.out.print("Player 3: "); System.out.println(args[2]);
        System.out.print("Player 4: "); System.out.println(args[3]);
        
		try {
			MauMau_Intf player[] = new MauMau_Intf[4];
            for(int t = 0; t < 4; t++) {
            	Class c = Class.forName(args[t]);
                player[t] = (MauMau_Intf)c.newInstance();
                player[t].setName(args[t] + (t+1));
                //System.out.println("player: c.getName() = " + player[t].getName());
            }
               
            for(int games = 0; games < 1000000; games++) {
            	if(games%200000 == 0){
            		System.out.println("Played Games: "+games);
            	}
            	MauMau_Game game = new MauMau_Game(player);
            	game.play(games);
            }
            
            for(int t = 0; t < 4; t++)
            	player[t].cleanup();
            
           } catch (Exception e) {
               e.printStackTrace();
           }

	}
}
